﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace BusinessLogic
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "WCFTicketing" in code, svc and config file together.
    public class WCFTicketing : IWCFTicketing
    {
        /// <summary>
        /// This method generates 6 random numbers for the ticket number
        /// </summary>
        /// <returns>A list containg six random numbers</returns>
        public IEnumerable<int> GenerateTicketNumber()
        {
            Random random = new Random();
            List<int> Numbers = new List<int>();
            for (int i = 0; i <= 5; i++)
            {
                int randomNumber = random.Next(0, 9);
                Numbers.Add(randomNumber);
            }

            return Numbers;
        }
    }
}
